<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/EQU_COM_DEFINITION_TASK_LOG.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/EQU_COM_DEFINITION_TASK_LOG.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '调度任务LOG',
                name: 'workbusiness/EQU_COM_DEFINITION_TASK_LOG',
                url: "/EQU_COM_DEFINITION_TASK_LOG/",
                sortName: "CreateOn desc"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"EQUTask_Id":"","OrderCode":"","Status":""});
            const searchFormOptions = ref([[{"dataKey":"工单（没有Id）","data":[],"title":"工单","field":"OrderCode","type":"select"},{"dataKey":"任务状态","data":[],"title":"任务状态","field":"Status","type":"select"},{"dataKey":"调度任务类型","data":[],"title":"任务类型","field":"EQUTask_Id"}]]);
            const columns = ref([{field:'MovePath_Id',title:'路径',type:'string',width:110,hidden:true,align:'left'},
                       {field:'MovePathSub_Id',title:'路径点',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Command',title:'指令',type:'string',width:110,align:'left',sort:true},
                       {field:'Equipment_Id',title:'设备',type:'string',width:110,align:'left'},
                       {field:'Source',title:'来源',type:'string',width:110,hidden:true,align:'left'},
                       {field:'IpUrl',title:'Ip',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ExecuteStart',title:'执行开始时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ExecuteEnd',title:'执行结束时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'SubPathNo',title:'路径序号',type:'int',width:110,align:'left'},
                       {field:'TaskType',title:'任务类型',type:'string',width:110,align:'left'},
                       {field:'EQUTask_Id',title:'任务类型',type:'string',bind:{ key:'调度任务类型',data:[]},width:110,align:'left'},
                       {field:'TaskNo',title:'任务No.',type:'string',width:110,require:true,align:'left'},
                       {field:'OperationName',title:'工序',type:'string',width:110,align:'left'},
                       {field:'OrderCode',title:'工单',type:'string',bind:{ key:'工单（没有Id）',data:[]},width:110,align:'left'},
                       {field:'Description',title:'描述',type:'string',width:220,align:'left'},
                       {field:'Status',title:'任务状态',type:'string',bind:{ key:'任务状态',data:[]},width:110,align:'left'},
                       {field:'SHELVES_Id',title:'刀库点',type:'string',width:110,align:'left'},
                       {field:'ActionEquipmentId',title:'执行设备',type:'string',width:110,align:'left'},
                       {field:'ActionSubPathNo',title:'执行路径',type:'int',width:110,hidden:true,align:'left'},
                       {field:'ActionSort',title:'执行顺序',type:'decimal',width:110,align:'left'},
                       {field:'ProgramId',title:'程序',type:'string',bind:{ key:'程序',data:[]},width:110,align:'left'},
                       {field:'ToolId',title:'刀',type:'string',width:110,align:'left'},
                       {field:'ExecuteTaskDiffTime',title:'执行时间',type:'int',width:110,align:'left'},
                       {field:'SecornSeq',title:'第二序',type:'int',width:110,align:'left'},
                       {field:'time',title:'时长',type:'string',width:110,align:'left'},
                       {field:'ProcessingNumber',title:'加工中序号',type:'decimal',width:110,align:'left'},
                       {field:'IsCurrentOrderCode',title:'工单(是否当前设备执行工单)',type:'string',width:110,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'},
                       {field:'Id',title:'Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ComDefintion_TaskId',title:'ComDefintion_TaskId',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'ComDefintionTaskNameZH',title:'指令任务名',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
